import request from "@/util/request.js";

export function getMenus() {
  return request.get("/api/private/v1/menus");
}
export function getRights() {
  return request.get("/api/private/v1/rights/list");
}

export function getRightsTree() {
  return request.get("/api/private/v1/rights/tree");
}
export function getRoles() {
  return request.get("/api/private/v1/roles");
}
export function deleteRoleRight(roleId, rightId) {
  return request.delete(`/api/private/v1/roles/${roleId}/rights/${rightId}`);
}
// 角色授权
export function authorization(roleId, rids) {
  return request.post(`/api/private/v1/roles/${roleId}/rights`, { rids });
}
